home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Floppyshop 2
/
Floppyshop - 2.zip
/
Floppyshop - 2.iso
/
art&graf.ix
/
art-0039
/
spr_des
/
source
/
spr_des1.a68
< prev
next >
Wrap
Text File
|
1997-04-16
|
1KB
|
56 lines
org 0
*;Source code to GFA basic
*; by Robert Warnestam, 1988-03-31
*;Print a 16*16 block from a screen (in memory)
*; to the screen
*;Parameters: Poke.L start+ 0,log_screen
*; Poke.L start+ 4,phys_screen
*; Poke.B start+ 8,x (0-9) position in phys_screen
*; Poke.B start+ 9,y (0-9)
*; Poke.B start+10,image (0-239) image in log_screen
*; then: Call start+12
*
*;start
*
var ds.b 12
*
*;get address to image (in log_screen)
*;addr=8*xi+2560*yi+log
*;xi=image MOD 20, yi=image DIV 20
lea var(pc),a2
move.l 0(a2),a0
clr.l d0
move.b 10(a2),d0
divu #20,d0 ;yi in low half, xi in high half
clr.l d1
move.w d0,d1 ;yi in D1
swap d0
and.l #$ffff,d0 ;xi in D0
mulu #8,d0
mulu #2560,d1
add.l d0,a0
add.l d1,a0
*;get address to output area
*;addr=8*x+2560*y
move.l 4(a2),a1
clr.l d0
clr.l d1
move.b 8(a2),d0
move.b 9(a2),d1
mulu #8,d0
mulu #2560,d1
add.l d0,a1
add.l d1,a1
*;copy 16*16 block
move.w #15,d0 ;16 lines
loop move.l (a0)+,(a1)+
move.l (a0)+,(a1)+
add.l #152,a0 ;next line
add.l #152,a1
dbf d0,loop
*
rts ;back to basic
*
end